/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package org.ipo.mm.ejb.facade.representative;

import java.util.List;
import javax.ejb.Local;
import org.ipo.mm.ejb.entities.Institution;
import org.ipo.mm.ejb.entities.Representative;

/**
 *
 * @author makcro
 */
@Local
public interface RepresentativeFacadeLocal {

    void create(Representative representative);

    void edit(Representative representative);

    void remove(Representative representative);

    Representative find(Object id);

    List<Representative> findAll();
    List<Representative> findWithEmail();
    public void markAsDeleted(int primaryKey);

    

    public void update(int id, java.lang.String firstName, java.lang.String lastName, int instituton, java.lang.String telephone, java.lang.String email, java.lang.String fax, java.lang.String function, java.lang.String note);

    List<Representative> search(String query);

    

    public Long getSearchResultCount(

            String nameFilter,
            String nameOperator,
            String telephoneFilter,
            String telephoneOperator,
            String faxFilter,
            String faxOperator,
            String emailFilter,
            String emailOperator,
            String functionFilter,
            String functionOperator,
            String[] institutionFilter,
            String[] iTypeFilter,
            String[] iRegionFilter,
            String[] iFamilyFilter,
            String[] iCityFilter,
            String orderBy);

    public java.util.List<org.ipo.mm.ejb.entities.Representative> search(java.lang.String nameFilter, java.lang.String nameOperator, java.lang.String telephoneFilter, java.lang.String telephoneOperator, java.lang.String faxFilter, java.lang.String faxOperator, java.lang.String emailFilter, java.lang.String emailOperator, java.lang.String functionFilter, java.lang.String functionOperator, java.lang.String[] institutionFilter, java.lang.String[] iTypeFilter, java.lang.String[] iRegionFilter, java.lang.String[] iFamilyFilter, java.lang.String[] iCityFilter, java.lang.String orderBy, int firstResult, int maxResults, boolean isQuickSearch);

    public List<Representative> findSimilar(
            String firstName,
            String lastName,
            Institution i);

}
